package com.fiidee.blog.service.impl;

import com.fiidee.blog.dto.BlogCategoryDTO;
import com.fiidee.blog.entity.BlogCategory;
import com.fiidee.blog.mapper.BlogCategoryMapper;
import com.fiidee.blog.service.BlogCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by 瑱彬 on 2015/5/28.
 */
@Service
public class BlogCategoryServiceImpl implements BlogCategoryService {

    @Autowired
    BlogCategoryMapper blogCategoryMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return blogCategoryMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(BlogCategory record) {
        return blogCategoryMapper.insert(record);
    }

    @Override
    public int insertSelective(BlogCategory record) {
        return blogCategoryMapper.insertSelective(record);
    }

    @Override
    public BlogCategory selectByPrimaryKey(Integer id) {
        return blogCategoryMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(BlogCategory record) {
        return blogCategoryMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(BlogCategory record) {
        return blogCategoryMapper.updateByPrimaryKey(record);
    }

    @Override
    @Deprecated
    public List<BlogCategory> selectByDTO(BlogCategoryDTO dto) {
        return blogCategoryMapper.selectByDTO(dto);
    }

    @Override
    @Deprecated
    public int deleteInIds(String ids) {
        return blogCategoryMapper.deleteInIds(ids);
    }

    @Override
    public List<Map<String, Object>> selectCategoryRightSide() {
        return blogCategoryMapper.selectCategoryRightSide();
    }
}
